#include "pch.h"
#include "matrix4x4.h"
#include "vector4.h"

c_matrix4x4 c_matrix4x4::m_identity = c_matrix4x4::Identity();

c_matrix4x4 make_view_matrix(const c_vector3& eye_pos, const c_vector3& lookat, const c_vector3& up)
{
    c_matrix4x4 view_mat = c_matrix4x4::Identity();
    D3DXMatrixLookAtLH(&view_mat, (D3DXVECTOR3*)&eye_pos, (D3DXVECTOR3*)&lookat, (D3DXVECTOR3*)&up); 
    return view_mat; 
}

c_matrix4x4 make_perspective_proj_matrix(const float fov, const float aspect, const float near_plane, const float far_plane)
{
    c_matrix4x4 proj_mat = c_matrix4x4::Identity();
    D3DXMatrixPerspectiveFovLH(&proj_mat, fov, aspect, near_plane, far_plane); 
    return proj_mat;
}